package com.neuedu.grainsapi.controller;

import com.neuedu.grainsapi.pojo.NagrProp;
import com.neuedu.grainsapi.service.NagrPropService;
import com.neuedu.grainsapi.util.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class NagrPropController {
    @Autowired
    private NagrPropService nagrPropService;
    @GetMapping("/queryNagrProp")
    public ResponseResult<List<NagrProp>> queryNagrProp(){
        List<NagrProp> nagrProps = nagrPropService.queryNagrProp();
        return new ResponseResult<>("200","yes",nagrProps);
    }
}
